using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VDESSIN
    {
        public DataRow Convert2DESSIN(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryDESSIN(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["DESMANDANT"] = " ".PadRight(2 ); 
         dwReturn["DESDESS"] = " ".PadRight(10 ); 
         dwReturn["DESNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["DESNEUDAT"] = " ".PadRight(0 ); 
         dwReturn["DESAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["DESAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["DESAENDZL"] = " ".PadRight(0 ); 
         dwReturn["DESKOLL"] = " ".PadRight(5 ); 
         dwReturn["DESYEAR"] = " ".PadRight(0 ); 
         dwReturn["DESKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["DESTYP"] = " ".PadRight(1 ); 
         dwReturn["DESAUSDESS"] = " ".PadRight(10 ); 
         dwReturn["DESSCHAB1"] = " ".PadRight(0 ); 
         dwReturn["DESSCHAB2"] = " ".PadRight(0 ); 
         dwReturn["DESBITO"] = " ".PadRight(1 ); 
         dwReturn["DESBRT"] = " ".PadRight(0 ); 
         dwReturn["DESDUO"] = " ".PadRight(1 ); 
         dwReturn["DESRAPH"] = " ".PadRight(0 ); 
         dwReturn["DESRAPB"] = " ".PadRight(0 ); 
         dwReturn["DESTHEMA"] = " ".PadRight(20 ); 
         dwReturn["DESKLASSE"] = " ".PadRight(20 ); 
         dwReturn["DESZGRP"] = " ".PadRight(4 ); 
         dwReturn["DESEFT"] = " ".PadRight(2 ); 
         dwReturn["DESBORD"] = " ".PadRight(2 ); 
         dwReturn["DESFOND"] = " ".PadRight(2 ); 
         dwReturn["DESMBED"] = " ".PadRight(0 ); 
         dwReturn["DESCOL"] = " ".PadRight(10 ); 
         dwReturn["DESMOTIV11"] = " ".PadRight(2 ); 
         dwReturn["DESMOTIV12"] = " ".PadRight(2 ); 
         dwReturn["DESMOTIV13"] = " ".PadRight(2 ); 
         dwReturn["DESMOTIV14"] = " ".PadRight(2 ); 
         dwReturn["DESMOTGR1"] = " ".PadRight(2 ); 
         dwReturn["DESMOTIV21"] = " ".PadRight(2 ); 
         dwReturn["DESMOTIV22"] = " ".PadRight(2 ); 
         dwReturn["DESMOTIV23"] = " ".PadRight(2 ); 
         dwReturn["DESMOTIV24"] = " ".PadRight(2 ); 
         dwReturn["DESMOTGR2"] = " ".PadRight(2 ); 
         dwReturn["DESVERSATZ"] = " ".PadRight(3 ); 
         dwReturn["DESBEZ"] = " ".PadRight(50 ); 
         dwReturn["DESDATAB1"] = " ".PadRight(0 ); 
         dwReturn["DESTAGE1"] = " ".PadRight(0 ); 
         dwReturn["DESSCHABAB1"] = " ".PadRight(1 ); 
         dwReturn["DESPREIS1"] = " ".PadRight(0 ); 
         dwReturn["DESWRSL1"] = " ".PadRight(3 ); 
         dwReturn["DESTAXO11"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO21"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO31"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO41"] = " ".PadRight(2 ); 
         dwReturn["DESDATAB2"] = " ".PadRight(0 ); 
         dwReturn["DESTAGE2"] = " ".PadRight(0 ); 
         dwReturn["DESSCHABAB2"] = " ".PadRight(1 ); 
         dwReturn["DESPREIS2"] = " ".PadRight(0 ); 
         dwReturn["DESWRSL2"] = " ".PadRight(3 ); 
         dwReturn["DESTAXO12"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO22"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO32"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO42"] = " ".PadRight(2 ); 
         dwReturn["DESDATAB3"] = " ".PadRight(0 ); 
         dwReturn["DESTAGE3"] = " ".PadRight(0 ); 
         dwReturn["DESSCHABAB3"] = " ".PadRight(1 ); 
         dwReturn["DESPREIS3"] = " ".PadRight(0 ); 
         dwReturn["DESWRSL3"] = " ".PadRight(3 ); 
         dwReturn["DESTAXO13"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO23"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO33"] = " ".PadRight(2 ); 
         dwReturn["DESTAXO43"] = " ".PadRight(2 ); 
         dwReturn["DESATEL"] = " ".PadRight(8 ); 
         dwReturn["DESKDAT"] = " ".PadRight(0 ); 
         dwReturn["DESEK"] = " ".PadRight(25 ); 
         dwReturn["DESRENR"] = " ".PadRight(10 ); 
         dwReturn["DESREDAT"] = " ".PadRight(0 ); 
         dwReturn["DESREPREIS"] = " ".PadRight(0 ); 
         dwReturn["DESREWRSL"] = " ".PadRight(3 ); 
         dwReturn["DESDATEL"] = " ".PadRight(10 ); 
         dwReturn["DESNUDAT"] = " ".PadRight(0 ); 
         dwReturn["DESSKNR"] = " ".PadRight(10 ); 
         dwReturn["DESFILMNR"] = " ".PadRight(10 ); 
         dwReturn["DESFHERST"] = " ".PadRight(8 ); 
         dwReturn["DESFRENR"] = " ".PadRight(10 ); 
         dwReturn["DESFREDAT"] = " ".PadRight(0 ); 
         dwReturn["DESFREPREIS"] = " ".PadRight(0 ); 
         dwReturn["DESFREWRSL"] = " ".PadRight(3 ); 
         dwReturn["DESDDAT"] = " ".PadRight(0 ); 
         dwReturn["DESSACHB"] = " ".PadRight(8 ); 
         dwReturn["DESGDAT"] = " ".PadRight(0 ); 
         dwReturn["DESFDVF"] = " ".PadRight(3 ); 
         dwReturn["DESMITDESS"] = " ".PadRight(10 ); 
         dwReturn["DESLO"] = " ".PadRight(2 ); 
         dwReturn["DESLB"] = " ".PadRight(2 ); 
         dwReturn["DESLP"] = " ".PadRight(8 ); 
         dwReturn["DESAUFBKZ"] = " ".PadRight(1 ); 
         dwReturn["DESGRAVBSP"] = " ".PadRight(0 ); 
         dwReturn["DESGRAVTERM"] = " ".PadRight(0 ); 
         dwReturn["DESFRMDGRAV"] = " ".PadRight(8 ); 
         dwReturn["DESZEICHNER"] = " ".PadRight(15 ); 
         dwReturn["DESZEICHSTD"] = " ".PadRight(0 ); 
         dwReturn["DESCADTAUGL"] = " ".PadRight(1 ); 
         dwReturn["DESCADOPER"] = " ".PadRight(15 ); 
         dwReturn["DESCADSTD"] = " ".PadRight(0 ); 
         dwReturn["DESKSTKRS"] = " ".PadRight(2 ); 
         dwReturn["DESKST"] = " ".PadRight(4 ); 
         dwReturn["DESGRAVHIN"] = " ".PadRight(1 ); 
         dwReturn["DESDESARTE"] = " ".PadRight(1 ); 
         dwReturn["DESDESNRE"] = " ".PadRight(10 ); 
         dwReturn["DESPLANM"] = " ".PadRight(0 ); 
         dwReturn["DESISTM"] = " ".PadRight(0 ); 
         dwReturn["DESGESKOST"] = " ".PadRight(0 ); 
         dwReturn["DESBETRKD"] = " ".PadRight(0 ); 
         dwReturn["DESBETRM"] = " ".PadRight(0 ); 
         dwReturn["DESPREISGR"] = " ".PadRight(1 ); 
         dwReturn["DESFORTSETZ"] = " ".PadRight(10 ); 
         dwReturn["DESUEBERDRK"] = " ".PadRight(10 ); 
         dwReturn["DESVORDR"] = " ".PadRight(10 ); 
         dwReturn["DESVORDERS"] = " ".PadRight(10 ); 
         dwReturn["DESRUECKS"] = " ".PadRight(10 ); 
         dwReturn["DESFARBKART"] = " ".PadRight(10 ); 
         dwReturn["DESMINDFA"] = " ".PadRight(0 ); 
         dwReturn["DESMINDGA"] = " ".PadRight(0 ); 
         dwReturn["DESMINDQA"] = " ".PadRight(0 ); 
         dwReturn["DESPRODART"] = " ".PadRight(1 ); 
         dwReturn["DESGRAVART"] = " ".PadRight(1 ); 
         dwReturn["DESUMFANG"] = " ".PadRight(0 ); 
         dwReturn["DESFABRTYP"] = " ".PadRight(1 ); 
         dwReturn["DESSTAT"] = " ".PadRight(1 ); 
         dwReturn["DESSCHWIER"] = " ".PadRight(1 ); 
         dwReturn["DESQUALRISK"] = " ".PadRight(0 ); 
         dwReturn["DESSRAPPTXT1"] = " ".PadRight(3 ); 
         dwReturn["DESSRAPPTXT2"] = " ".PadRight(3 ); 
         dwReturn["DESSRAPPTXT3"] = " ".PadRight(3 ); 
         dwReturn["DESSRAPPTXT4"] = " ".PadRight(3 ); 
         dwReturn["DESSRAPPTXT5"] = " ".PadRight(3 ); 
         dwReturn["DESERSTDR"] = " ".PadRight(3 ); 
         dwReturn["DESEGAL"] = " ".PadRight(1 ); 
         dwReturn["DESKANTENG"] = " ".PadRight(1 ); 
         dwReturn["DESSCHUETZ"] = " ".PadRight(1 ); 
         dwReturn["DESNAEHPR"] = " ".PadRight(1 ); 
         dwReturn["DESUNIFAEH"] = " ".PadRight(1 ); 
         dwReturn["DESBEM"] = " ".PadRight(1 ); 
         dwReturn["DESERSDEA"] = " ".PadRight(0 ); 
         dwReturn["DESERSDA"] = " ".PadRight(0 ); 
         dwReturn["DESABDRDAT"] = " ".PadRight(0 ); 
         dwReturn["DESABDRLNR"] = " ".PadRight(0 ); 
         dwReturn["DESWDGRAV"] = " ".PadRight(0 ); 
         dwReturn["DESMERKMAL1"] = " ".PadRight(1 ); 
         dwReturn["DESMERKMAL2"] = " ".PadRight(1 ); 
         dwReturn["DESMERKMAL3"] = " ".PadRight(1 ); 
         dwReturn["DESFILLER"] = " ".PadRight(92 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapDESSIN(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveDESSIN(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryDESSIN(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapDESSIN(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertDESSIN(dwLocal, ITXDBVERSION);
            }
            UpdateDESSIN(dwLocal);
        }
        public void InsertDESSIN(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO DESSIN(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryDESSIN(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM DESSIN WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM DESSIN  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "DESSIN";
            Return = Result;
            return Return;
        }
        public void DeleteDESSIN(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM DESSIN   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateDESSIN(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE DESSIN SET "
                    +"DESMANDANT= :DESMANDANT,"
                    +"DESDESS= :DESDESS,"
                    +"DESNEUBEN= :DESNEUBEN,"
                    +"DESNEUDAT= :DESNEUDAT,"
                    +"DESAENDBEN= :DESAENDBEN,"
                    +"DESAENDDAT= :DESAENDDAT,"
                    +"DESAENDZL= :DESAENDZL,"
                    +"DESKOLL= :DESKOLL,"
                    +"DESYEAR= :DESYEAR,"
                    +"DESKUNDNR= :DESKUNDNR,"
                    +"DESTYP= :DESTYP,"
                    +"DESAUSDESS= :DESAUSDESS,"
                    +"DESSCHAB1= :DESSCHAB1,"
                    +"DESSCHAB2= :DESSCHAB2,"
                    +"DESBITO= :DESBITO,"
                    +"DESBRT= :DESBRT,"
                    +"DESDUO= :DESDUO,"
                    +"DESRAPH= :DESRAPH,"
                    +"DESRAPB= :DESRAPB,"
                    +"DESTHEMA= :DESTHEMA,"
                    +"DESKLASSE= :DESKLASSE,"
                    +"DESZGRP= :DESZGRP,"
                    +"DESEFT= :DESEFT,"
                    +"DESBORD= :DESBORD,"
                    +"DESFOND= :DESFOND,"
                    +"DESMBED= :DESMBED,"
                    +"DESCOL= :DESCOL,"
                    +"DESMOTIV11= :DESMOTIV11,"
                    +"DESMOTIV12= :DESMOTIV12,"
                    +"DESMOTIV13= :DESMOTIV13,"
                    +"DESMOTIV14= :DESMOTIV14,"
                    +"DESMOTGR1= :DESMOTGR1,"
                    +"DESMOTIV21= :DESMOTIV21,"
                    +"DESMOTIV22= :DESMOTIV22,"
                    +"DESMOTIV23= :DESMOTIV23,"
                    +"DESMOTIV24= :DESMOTIV24,"
                    +"DESMOTGR2= :DESMOTGR2,"
                    +"DESVERSATZ= :DESVERSATZ,"
                    +"DESBEZ= :DESBEZ,"
                    +"DESDATAB1= :DESDATAB1,"
                    +"DESTAGE1= :DESTAGE1,"
                    +"DESSCHABAB1= :DESSCHABAB1,"
                    +"DESPREIS1= :DESPREIS1,"
                    +"DESWRSL1= :DESWRSL1,"
                    +"DESTAXO11= :DESTAXO11,"
                    +"DESTAXO21= :DESTAXO21,"
                    +"DESTAXO31= :DESTAXO31,"
                    +"DESTAXO41= :DESTAXO41,"
                    +"DESDATAB2= :DESDATAB2,"
                    +"DESTAGE2= :DESTAGE2,"
                    +"DESSCHABAB2= :DESSCHABAB2,"
                    +"DESPREIS2= :DESPREIS2,"
                    +"DESWRSL2= :DESWRSL2,"
                    +"DESTAXO12= :DESTAXO12,"
                    +"DESTAXO22= :DESTAXO22,"
                    +"DESTAXO32= :DESTAXO32,"
                    +"DESTAXO42= :DESTAXO42,"
                    +"DESDATAB3= :DESDATAB3,"
                    +"DESTAGE3= :DESTAGE3,"
                    +"DESSCHABAB3= :DESSCHABAB3,"
                    +"DESPREIS3= :DESPREIS3,"
                    +"DESWRSL3= :DESWRSL3,"
                    +"DESTAXO13= :DESTAXO13,"
                    +"DESTAXO23= :DESTAXO23,"
                    +"DESTAXO33= :DESTAXO33,"
                    +"DESTAXO43= :DESTAXO43,"
                    +"DESATEL= :DESATEL,"
                    +"DESKDAT= :DESKDAT,"
                    +"DESEK= :DESEK,"
                    +"DESRENR= :DESRENR,"
                    +"DESREDAT= :DESREDAT,"
                    +"DESREPREIS= :DESREPREIS,"
                    +"DESREWRSL= :DESREWRSL,"
                    +"DESDATEL= :DESDATEL,"
                    +"DESNUDAT= :DESNUDAT,"
                    +"DESSKNR= :DESSKNR,"
                    +"DESFILMNR= :DESFILMNR,"
                    +"DESFHERST= :DESFHERST,"
                    +"DESFRENR= :DESFRENR,"
                    +"DESFREDAT= :DESFREDAT,"
                    +"DESFREPREIS= :DESFREPREIS,"
                    +"DESFREWRSL= :DESFREWRSL,"
                    +"DESDDAT= :DESDDAT,"
                    +"DESSACHB= :DESSACHB,"
                    +"DESGDAT= :DESGDAT,"
                    +"DESFDVF= :DESFDVF,"
                    +"DESMITDESS= :DESMITDESS,"
                    +"DESLO= :DESLO,"
                    +"DESLB= :DESLB,"
                    +"DESLP= :DESLP,"
                    +"DESAUFBKZ= :DESAUFBKZ,"
                    +"DESGRAVBSP= :DESGRAVBSP,"
                    +"DESGRAVTERM= :DESGRAVTERM,"
                    +"DESFRMDGRAV= :DESFRMDGRAV,"
                    +"DESZEICHNER= :DESZEICHNER,"
                    +"DESZEICHSTD= :DESZEICHSTD,"
                    +"DESCADTAUGL= :DESCADTAUGL,"
                    +"DESCADOPER= :DESCADOPER,"
                    +"DESCADSTD= :DESCADSTD,"
                    +"DESKSTKRS= :DESKSTKRS,"
                    +"DESKST= :DESKST,"
                    +"DESGRAVHIN= :DESGRAVHIN,"
                    +"DESDESARTE= :DESDESARTE,"
                    +"DESDESNRE= :DESDESNRE,"
                    +"DESPLANM= :DESPLANM,"
                    +"DESISTM= :DESISTM,"
                    +"DESGESKOST= :DESGESKOST,"
                    +"DESBETRKD= :DESBETRKD,"
                    +"DESBETRM= :DESBETRM,"
                    +"DESPREISGR= :DESPREISGR,"
                    +"DESFORTSETZ= :DESFORTSETZ,"
                    +"DESUEBERDRK= :DESUEBERDRK,"
                    +"DESVORDR= :DESVORDR,"
                    +"DESVORDERS= :DESVORDERS,"
                    +"DESRUECKS= :DESRUECKS,"
                    +"DESFARBKART= :DESFARBKART,"
                    +"DESMINDFA= :DESMINDFA,"
                    +"DESMINDGA= :DESMINDGA,"
                    +"DESMINDQA= :DESMINDQA,"
                    +"DESPRODART= :DESPRODART,"
                    +"DESGRAVART= :DESGRAVART,"
                    +"DESUMFANG= :DESUMFANG,"
                    +"DESFABRTYP= :DESFABRTYP,"
                    +"DESSTAT= :DESSTAT,"
                    +"DESSCHWIER= :DESSCHWIER,"
                    +"DESQUALRISK= :DESQUALRISK,"
                    +"DESSRAPPTXT1= :DESSRAPPTXT1,"
                    +"DESSRAPPTXT2= :DESSRAPPTXT2,"
                    +"DESSRAPPTXT3= :DESSRAPPTXT3,"
                    +"DESSRAPPTXT4= :DESSRAPPTXT4,"
                    +"DESSRAPPTXT5= :DESSRAPPTXT5,"
                    +"DESERSTDR= :DESERSTDR,"
                    +"DESEGAL= :DESEGAL,"
                    +"DESKANTENG= :DESKANTENG,"
                    +"DESSCHUETZ= :DESSCHUETZ,"
                    +"DESNAEHPR= :DESNAEHPR,"
                    +"DESUNIFAEH= :DESUNIFAEH,"
                    +"DESBEM= :DESBEM,"
                    +"DESERSDEA= :DESERSDEA,"
                    +"DESERSDA= :DESERSDA,"
                    +"DESABDRDAT= :DESABDRDAT,"
                    +"DESABDRLNR= :DESABDRLNR,"
                    +"DESWDGRAV= :DESWDGRAV,"
                    +"DESMERKMAL1= :DESMERKMAL1,"
                    +"DESMERKMAL2= :DESMERKMAL2,"
                    +"DESMERKMAL3= :DESMERKMAL3,"
                    +"DESFILLER= :DESFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("DESMANDANT", OracleType.NVarChar).Value = dwData["DESMANDANT"].ToString(); 
          or1.Parameters.Add("DESDESS", OracleType.NVarChar).Value = dwData["DESDESS"].ToString(); 
          or1.Parameters.Add("DESNEUBEN", OracleType.NVarChar).Value = dwData["DESNEUBEN"].ToString(); 
          or1.Parameters.Add("DESNEUDAT", OracleType.NVarChar).Value = dwData["DESNEUDAT"].ToString(); 
          or1.Parameters.Add("DESAENDBEN", OracleType.NVarChar).Value = dwData["DESAENDBEN"].ToString(); 
          or1.Parameters.Add("DESAENDDAT", OracleType.NVarChar).Value = dwData["DESAENDDAT"].ToString(); 
          or1.Parameters.Add("DESAENDZL", OracleType.NVarChar).Value = dwData["DESAENDZL"].ToString(); 
          or1.Parameters.Add("DESKOLL", OracleType.NVarChar).Value = dwData["DESKOLL"].ToString(); 
          or1.Parameters.Add("DESYEAR", OracleType.NVarChar).Value = dwData["DESYEAR"].ToString(); 
          or1.Parameters.Add("DESKUNDNR", OracleType.NVarChar).Value = dwData["DESKUNDNR"].ToString(); 
          or1.Parameters.Add("DESTYP", OracleType.NVarChar).Value = dwData["DESTYP"].ToString(); 
          or1.Parameters.Add("DESAUSDESS", OracleType.NVarChar).Value = dwData["DESAUSDESS"].ToString(); 
          or1.Parameters.Add("DESSCHAB1", OracleType.NVarChar).Value = dwData["DESSCHAB1"].ToString(); 
          or1.Parameters.Add("DESSCHAB2", OracleType.NVarChar).Value = dwData["DESSCHAB2"].ToString(); 
          or1.Parameters.Add("DESBITO", OracleType.NVarChar).Value = dwData["DESBITO"].ToString(); 
          or1.Parameters.Add("DESBRT", OracleType.NVarChar).Value = dwData["DESBRT"].ToString(); 
          or1.Parameters.Add("DESDUO", OracleType.NVarChar).Value = dwData["DESDUO"].ToString(); 
          or1.Parameters.Add("DESRAPH", OracleType.NVarChar).Value = dwData["DESRAPH"].ToString(); 
          or1.Parameters.Add("DESRAPB", OracleType.NVarChar).Value = dwData["DESRAPB"].ToString(); 
          or1.Parameters.Add("DESTHEMA", OracleType.NVarChar).Value = dwData["DESTHEMA"].ToString(); 
          or1.Parameters.Add("DESKLASSE", OracleType.NVarChar).Value = dwData["DESKLASSE"].ToString(); 
          or1.Parameters.Add("DESZGRP", OracleType.NVarChar).Value = dwData["DESZGRP"].ToString(); 
          or1.Parameters.Add("DESEFT", OracleType.NVarChar).Value = dwData["DESEFT"].ToString(); 
          or1.Parameters.Add("DESBORD", OracleType.NVarChar).Value = dwData["DESBORD"].ToString(); 
          or1.Parameters.Add("DESFOND", OracleType.NVarChar).Value = dwData["DESFOND"].ToString(); 
          or1.Parameters.Add("DESMBED", OracleType.NVarChar).Value = dwData["DESMBED"].ToString(); 
          or1.Parameters.Add("DESCOL", OracleType.NVarChar).Value = dwData["DESCOL"].ToString(); 
          or1.Parameters.Add("DESMOTIV11", OracleType.NVarChar).Value = dwData["DESMOTIV11"].ToString(); 
          or1.Parameters.Add("DESMOTIV12", OracleType.NVarChar).Value = dwData["DESMOTIV12"].ToString(); 
          or1.Parameters.Add("DESMOTIV13", OracleType.NVarChar).Value = dwData["DESMOTIV13"].ToString(); 
          or1.Parameters.Add("DESMOTIV14", OracleType.NVarChar).Value = dwData["DESMOTIV14"].ToString(); 
          or1.Parameters.Add("DESMOTGR1", OracleType.NVarChar).Value = dwData["DESMOTGR1"].ToString(); 
          or1.Parameters.Add("DESMOTIV21", OracleType.NVarChar).Value = dwData["DESMOTIV21"].ToString(); 
          or1.Parameters.Add("DESMOTIV22", OracleType.NVarChar).Value = dwData["DESMOTIV22"].ToString(); 
          or1.Parameters.Add("DESMOTIV23", OracleType.NVarChar).Value = dwData["DESMOTIV23"].ToString(); 
          or1.Parameters.Add("DESMOTIV24", OracleType.NVarChar).Value = dwData["DESMOTIV24"].ToString(); 
          or1.Parameters.Add("DESMOTGR2", OracleType.NVarChar).Value = dwData["DESMOTGR2"].ToString(); 
          or1.Parameters.Add("DESVERSATZ", OracleType.NVarChar).Value = dwData["DESVERSATZ"].ToString(); 
          or1.Parameters.Add("DESBEZ", OracleType.NVarChar).Value = dwData["DESBEZ"].ToString(); 
          or1.Parameters.Add("DESDATAB1", OracleType.NVarChar).Value = dwData["DESDATAB1"].ToString(); 
          or1.Parameters.Add("DESTAGE1", OracleType.NVarChar).Value = dwData["DESTAGE1"].ToString(); 
          or1.Parameters.Add("DESSCHABAB1", OracleType.NVarChar).Value = dwData["DESSCHABAB1"].ToString(); 
          or1.Parameters.Add("DESPREIS1", OracleType.NVarChar).Value = dwData["DESPREIS1"].ToString(); 
          or1.Parameters.Add("DESWRSL1", OracleType.NVarChar).Value = dwData["DESWRSL1"].ToString(); 
          or1.Parameters.Add("DESTAXO11", OracleType.NVarChar).Value = dwData["DESTAXO11"].ToString(); 
          or1.Parameters.Add("DESTAXO21", OracleType.NVarChar).Value = dwData["DESTAXO21"].ToString(); 
          or1.Parameters.Add("DESTAXO31", OracleType.NVarChar).Value = dwData["DESTAXO31"].ToString(); 
          or1.Parameters.Add("DESTAXO41", OracleType.NVarChar).Value = dwData["DESTAXO41"].ToString(); 
          or1.Parameters.Add("DESDATAB2", OracleType.NVarChar).Value = dwData["DESDATAB2"].ToString(); 
          or1.Parameters.Add("DESTAGE2", OracleType.NVarChar).Value = dwData["DESTAGE2"].ToString(); 
          or1.Parameters.Add("DESSCHABAB2", OracleType.NVarChar).Value = dwData["DESSCHABAB2"].ToString(); 
          or1.Parameters.Add("DESPREIS2", OracleType.NVarChar).Value = dwData["DESPREIS2"].ToString(); 
          or1.Parameters.Add("DESWRSL2", OracleType.NVarChar).Value = dwData["DESWRSL2"].ToString(); 
          or1.Parameters.Add("DESTAXO12", OracleType.NVarChar).Value = dwData["DESTAXO12"].ToString(); 
          or1.Parameters.Add("DESTAXO22", OracleType.NVarChar).Value = dwData["DESTAXO22"].ToString(); 
          or1.Parameters.Add("DESTAXO32", OracleType.NVarChar).Value = dwData["DESTAXO32"].ToString(); 
          or1.Parameters.Add("DESTAXO42", OracleType.NVarChar).Value = dwData["DESTAXO42"].ToString(); 
          or1.Parameters.Add("DESDATAB3", OracleType.NVarChar).Value = dwData["DESDATAB3"].ToString(); 
          or1.Parameters.Add("DESTAGE3", OracleType.NVarChar).Value = dwData["DESTAGE3"].ToString(); 
          or1.Parameters.Add("DESSCHABAB3", OracleType.NVarChar).Value = dwData["DESSCHABAB3"].ToString(); 
          or1.Parameters.Add("DESPREIS3", OracleType.NVarChar).Value = dwData["DESPREIS3"].ToString(); 
          or1.Parameters.Add("DESWRSL3", OracleType.NVarChar).Value = dwData["DESWRSL3"].ToString(); 
          or1.Parameters.Add("DESTAXO13", OracleType.NVarChar).Value = dwData["DESTAXO13"].ToString(); 
          or1.Parameters.Add("DESTAXO23", OracleType.NVarChar).Value = dwData["DESTAXO23"].ToString(); 
          or1.Parameters.Add("DESTAXO33", OracleType.NVarChar).Value = dwData["DESTAXO33"].ToString(); 
          or1.Parameters.Add("DESTAXO43", OracleType.NVarChar).Value = dwData["DESTAXO43"].ToString(); 
          or1.Parameters.Add("DESATEL", OracleType.NVarChar).Value = dwData["DESATEL"].ToString(); 
          or1.Parameters.Add("DESKDAT", OracleType.NVarChar).Value = dwData["DESKDAT"].ToString(); 
          or1.Parameters.Add("DESEK", OracleType.NVarChar).Value = dwData["DESEK"].ToString(); 
          or1.Parameters.Add("DESRENR", OracleType.NVarChar).Value = dwData["DESRENR"].ToString(); 
          or1.Parameters.Add("DESREDAT", OracleType.NVarChar).Value = dwData["DESREDAT"].ToString(); 
          or1.Parameters.Add("DESREPREIS", OracleType.NVarChar).Value = dwData["DESREPREIS"].ToString(); 
          or1.Parameters.Add("DESREWRSL", OracleType.NVarChar).Value = dwData["DESREWRSL"].ToString(); 
          or1.Parameters.Add("DESDATEL", OracleType.NVarChar).Value = dwData["DESDATEL"].ToString(); 
          or1.Parameters.Add("DESNUDAT", OracleType.NVarChar).Value = dwData["DESNUDAT"].ToString(); 
          or1.Parameters.Add("DESSKNR", OracleType.NVarChar).Value = dwData["DESSKNR"].ToString(); 
          or1.Parameters.Add("DESFILMNR", OracleType.NVarChar).Value = dwData["DESFILMNR"].ToString(); 
          or1.Parameters.Add("DESFHERST", OracleType.NVarChar).Value = dwData["DESFHERST"].ToString(); 
          or1.Parameters.Add("DESFRENR", OracleType.NVarChar).Value = dwData["DESFRENR"].ToString(); 
          or1.Parameters.Add("DESFREDAT", OracleType.NVarChar).Value = dwData["DESFREDAT"].ToString(); 
          or1.Parameters.Add("DESFREPREIS", OracleType.NVarChar).Value = dwData["DESFREPREIS"].ToString(); 
          or1.Parameters.Add("DESFREWRSL", OracleType.NVarChar).Value = dwData["DESFREWRSL"].ToString(); 
          or1.Parameters.Add("DESDDAT", OracleType.NVarChar).Value = dwData["DESDDAT"].ToString(); 
          or1.Parameters.Add("DESSACHB", OracleType.NVarChar).Value = dwData["DESSACHB"].ToString(); 
          or1.Parameters.Add("DESGDAT", OracleType.NVarChar).Value = dwData["DESGDAT"].ToString(); 
          or1.Parameters.Add("DESFDVF", OracleType.NVarChar).Value = dwData["DESFDVF"].ToString(); 
          or1.Parameters.Add("DESMITDESS", OracleType.NVarChar).Value = dwData["DESMITDESS"].ToString(); 
          or1.Parameters.Add("DESLO", OracleType.NVarChar).Value = dwData["DESLO"].ToString(); 
          or1.Parameters.Add("DESLB", OracleType.NVarChar).Value = dwData["DESLB"].ToString(); 
          or1.Parameters.Add("DESLP", OracleType.NVarChar).Value = dwData["DESLP"].ToString(); 
          or1.Parameters.Add("DESAUFBKZ", OracleType.NVarChar).Value = dwData["DESAUFBKZ"].ToString(); 
          or1.Parameters.Add("DESGRAVBSP", OracleType.NVarChar).Value = dwData["DESGRAVBSP"].ToString(); 
          or1.Parameters.Add("DESGRAVTERM", OracleType.NVarChar).Value = dwData["DESGRAVTERM"].ToString(); 
          or1.Parameters.Add("DESFRMDGRAV", OracleType.NVarChar).Value = dwData["DESFRMDGRAV"].ToString(); 
          or1.Parameters.Add("DESZEICHNER", OracleType.NVarChar).Value = dwData["DESZEICHNER"].ToString(); 
          or1.Parameters.Add("DESZEICHSTD", OracleType.NVarChar).Value = dwData["DESZEICHSTD"].ToString(); 
          or1.Parameters.Add("DESCADTAUGL", OracleType.NVarChar).Value = dwData["DESCADTAUGL"].ToString(); 
          or1.Parameters.Add("DESCADOPER", OracleType.NVarChar).Value = dwData["DESCADOPER"].ToString(); 
          or1.Parameters.Add("DESCADSTD", OracleType.NVarChar).Value = dwData["DESCADSTD"].ToString(); 
          or1.Parameters.Add("DESKSTKRS", OracleType.NVarChar).Value = dwData["DESKSTKRS"].ToString(); 
          or1.Parameters.Add("DESKST", OracleType.NVarChar).Value = dwData["DESKST"].ToString(); 
          or1.Parameters.Add("DESGRAVHIN", OracleType.NVarChar).Value = dwData["DESGRAVHIN"].ToString(); 
          or1.Parameters.Add("DESDESARTE", OracleType.NVarChar).Value = dwData["DESDESARTE"].ToString(); 
          or1.Parameters.Add("DESDESNRE", OracleType.NVarChar).Value = dwData["DESDESNRE"].ToString(); 
          or1.Parameters.Add("DESPLANM", OracleType.NVarChar).Value = dwData["DESPLANM"].ToString(); 
          or1.Parameters.Add("DESISTM", OracleType.NVarChar).Value = dwData["DESISTM"].ToString(); 
          or1.Parameters.Add("DESGESKOST", OracleType.NVarChar).Value = dwData["DESGESKOST"].ToString(); 
          or1.Parameters.Add("DESBETRKD", OracleType.NVarChar).Value = dwData["DESBETRKD"].ToString(); 
          or1.Parameters.Add("DESBETRM", OracleType.NVarChar).Value = dwData["DESBETRM"].ToString(); 
          or1.Parameters.Add("DESPREISGR", OracleType.NVarChar).Value = dwData["DESPREISGR"].ToString(); 
          or1.Parameters.Add("DESFORTSETZ", OracleType.NVarChar).Value = dwData["DESFORTSETZ"].ToString(); 
          or1.Parameters.Add("DESUEBERDRK", OracleType.NVarChar).Value = dwData["DESUEBERDRK"].ToString(); 
          or1.Parameters.Add("DESVORDR", OracleType.NVarChar).Value = dwData["DESVORDR"].ToString(); 
          or1.Parameters.Add("DESVORDERS", OracleType.NVarChar).Value = dwData["DESVORDERS"].ToString(); 
          or1.Parameters.Add("DESRUECKS", OracleType.NVarChar).Value = dwData["DESRUECKS"].ToString(); 
          or1.Parameters.Add("DESFARBKART", OracleType.NVarChar).Value = dwData["DESFARBKART"].ToString(); 
          or1.Parameters.Add("DESMINDFA", OracleType.NVarChar).Value = dwData["DESMINDFA"].ToString(); 
          or1.Parameters.Add("DESMINDGA", OracleType.NVarChar).Value = dwData["DESMINDGA"].ToString(); 
          or1.Parameters.Add("DESMINDQA", OracleType.NVarChar).Value = dwData["DESMINDQA"].ToString(); 
          or1.Parameters.Add("DESPRODART", OracleType.NVarChar).Value = dwData["DESPRODART"].ToString(); 
          or1.Parameters.Add("DESGRAVART", OracleType.NVarChar).Value = dwData["DESGRAVART"].ToString(); 
          or1.Parameters.Add("DESUMFANG", OracleType.NVarChar).Value = dwData["DESUMFANG"].ToString(); 
          or1.Parameters.Add("DESFABRTYP", OracleType.NVarChar).Value = dwData["DESFABRTYP"].ToString(); 
          or1.Parameters.Add("DESSTAT", OracleType.NVarChar).Value = dwData["DESSTAT"].ToString(); 
          or1.Parameters.Add("DESSCHWIER", OracleType.NVarChar).Value = dwData["DESSCHWIER"].ToString(); 
          or1.Parameters.Add("DESQUALRISK", OracleType.NVarChar).Value = dwData["DESQUALRISK"].ToString(); 
          or1.Parameters.Add("DESSRAPPTXT1", OracleType.NVarChar).Value = dwData["DESSRAPPTXT1"].ToString(); 
          or1.Parameters.Add("DESSRAPPTXT2", OracleType.NVarChar).Value = dwData["DESSRAPPTXT2"].ToString(); 
          or1.Parameters.Add("DESSRAPPTXT3", OracleType.NVarChar).Value = dwData["DESSRAPPTXT3"].ToString(); 
          or1.Parameters.Add("DESSRAPPTXT4", OracleType.NVarChar).Value = dwData["DESSRAPPTXT4"].ToString(); 
          or1.Parameters.Add("DESSRAPPTXT5", OracleType.NVarChar).Value = dwData["DESSRAPPTXT5"].ToString(); 
          or1.Parameters.Add("DESERSTDR", OracleType.NVarChar).Value = dwData["DESERSTDR"].ToString(); 
          or1.Parameters.Add("DESEGAL", OracleType.NVarChar).Value = dwData["DESEGAL"].ToString(); 
          or1.Parameters.Add("DESKANTENG", OracleType.NVarChar).Value = dwData["DESKANTENG"].ToString(); 
          or1.Parameters.Add("DESSCHUETZ", OracleType.NVarChar).Value = dwData["DESSCHUETZ"].ToString(); 
          or1.Parameters.Add("DESNAEHPR", OracleType.NVarChar).Value = dwData["DESNAEHPR"].ToString(); 
          or1.Parameters.Add("DESUNIFAEH", OracleType.NVarChar).Value = dwData["DESUNIFAEH"].ToString(); 
          or1.Parameters.Add("DESBEM", OracleType.NVarChar).Value = dwData["DESBEM"].ToString(); 
          or1.Parameters.Add("DESERSDEA", OracleType.NVarChar).Value = dwData["DESERSDEA"].ToString(); 
          or1.Parameters.Add("DESERSDA", OracleType.NVarChar).Value = dwData["DESERSDA"].ToString(); 
          or1.Parameters.Add("DESABDRDAT", OracleType.NVarChar).Value = dwData["DESABDRDAT"].ToString(); 
          or1.Parameters.Add("DESABDRLNR", OracleType.NVarChar).Value = dwData["DESABDRLNR"].ToString(); 
          or1.Parameters.Add("DESWDGRAV", OracleType.NVarChar).Value = dwData["DESWDGRAV"].ToString(); 
          or1.Parameters.Add("DESMERKMAL1", OracleType.NVarChar).Value = dwData["DESMERKMAL1"].ToString(); 
          or1.Parameters.Add("DESMERKMAL2", OracleType.NVarChar).Value = dwData["DESMERKMAL2"].ToString(); 
          or1.Parameters.Add("DESMERKMAL3", OracleType.NVarChar).Value = dwData["DESMERKMAL3"].ToString(); 
          or1.Parameters.Add("DESFILLER", OracleType.NVarChar).Value = dwData["DESFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
